import request from '@/utils/request'

// 查询打卡列表
export function listPunch(query) {
  return request({
    url: '/business/punch/list',
    method: 'get',
    params: query
  })
}

// 查询打卡详细
export function getPunch(id) {
  return request({
    url: '/business/punch/' + id,
    method: 'get'
  })
}

// 查询打卡详细
export function queryPunchByDate(date) {
  return request({
    url: '/business/punch/query-by-date/' + date,
    method: 'get'
  })
}

// 新增打卡
export function addPunch(data) {
  return request({
    url: '/business/punch',
    method: 'post',
    data: data
  })
}

// 修改打卡
export function updatePunch(data) {
  return request({
    url: '/business/punch',
    method: 'put',
    data: data
  })
}

// 删除打卡
export function delPunch(id) {
  return request({
    url: '/business/punch/' + id,
    method: 'delete'
  })
}

// 导出打卡
export function exportPunch(query) {
  return request({
    url: '/business/punch/export',
    method: 'get',
    params: query
  })
}
